package org.jha.alarm.jdupal;

import java.lang.reflect.Field;

public class JDUPALDemo {
	public int a;
	public int b;
	public int c;
	public int d;
	public int e;

	public static void main(String[] args) {
		Field[] fields = JDUPALDemo.class.getFields();
		for (Field field : fields) {
			System.out.println(field.getName());
		}
		int deviceNo = 0;
		boolean success = JDUPALAPI.INSTANCE.JG_OpenDV(deviceNo);
		if (!success) {
			System.out.println("open failed!");
			return;
		}
		boolean DO = true;
		boolean NOT = false;
		byte fre = 15;
		// red/
		success = JDUPALAPI.INSTANCE.JG_3_SetLamp_Beep(deviceNo, NOT, fre, NOT,
				fre, DO, fre, NOT, fre);
		System.out.println(success);
		try {
			Thread.sleep(5000);
		} catch (InterruptedException e) {
			// TODO Auto-generated catch block
			e.printStackTrace();
		}
		JDUPALAPI.INSTANCE.JG_Clear(deviceNo);
		success = JDUPALAPI.INSTANCE.JG_CloseDV(deviceNo);
	}

}
